<?php
class PokerHelper extends AppHelper {
        function simpleDeck($deck) {
		$content = '';
		foreach ($deck as $id => $card) {
			$lead =	$card[1];

			if ($lead === 'h') {
				$hLead = '&hearts;';
				$style = "red";
			} elseif($lead === 's') {
				$hLead = '&spades;';
				$style = "black";
			} elseif($lead === 'd') {
				$hLead = '&diams;';
				$style = "red";
			} elseif($lead === 'c') {
				$hLead = '&clubs;';
				$style = "black";
			}
			$val  = $card[0];
			if ($card[0] === 'T') {
				$val = '10';
			}

			$content .= '<span class="'. $style  .' card">' . $val . ' ' . $hLead . '</span>';
# $content .= '<ul class="'. $style  .' card"><li>' . $val . '</li><li>' . $hLead . '</li></ul>';

		}
		
		return $this->output($content);
        }
}
?>
